home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 32 / corew222.zip / COREWARS.DOC < prev    next >
Text File  |  1990-08-02  |  9KB  |  216 lines

  1.      COREWARS (Revision 2.22)                              Page 1 of 5
  2.      Copyright (c) Triskelian Simulations 1990.
  3.  
  4.  
  5.  
  6.  
  7.      Program:   COREWARS
  8.      Revision:  2.22
  9.      Date:      02 August 1990
  10.  
  11.  
  12.      COREWARS (just a little light reading)
  13.      ======================================
  14.  
  15.      The enclosed files are released (again) into the public domain.
  16.      The original program was written by Kevin A. Bjorke in May 1984.
  17.      Mr.Bjorke's version was targeted at Unix machines and used the
  18.      Small-C dialect.
  19.  
  20.      The program itself is based on several Scientific American
  21.      "Computer Recreations" articles written by A.K.Dewdney.  These
  22.      articles appeared in the May 1984, March 1985, and January 1987
  23.      issues.  Check these articles at your local library for the gory
  24.      details.
  25.  
  26.  
  27.      "REDCODE"
  28.      =========
  29.  
  30.      Core Wars uses a machine language-like instruction set called
  31.      "REDCODE".  The table below shows the basic instruction formats
  32.      and their addressing modes.  Programs must be terminated by the
  33.      instruction END (no arguments).
  34.  
  35.  
  36.           Description                                   Instruction
  37.           -----------------------------------           -----------
  38.           Move A to B                    MOV   A   B
  39.           Add A to B                    ADD   A   B
  40.           Subtract A from B                SUB   A   B
  41.           Jump to A                    JMP   A
  42.           Jump to A if B is zero            JMZ   A   B
  43.           Jump to A if B is > zero            JMG   A   B
  44.           Decrement B, jump to A if zero         DJZ   A   B
  45.           Compare A to B, skip next loc if !=        CMP   A   B
  46.           Data                        DAT       B
  47.           Protect                    PCT   A
  48.  
  49.           Addressing modes:  IMMEDIATE    #n
  50.                        DIRECT        n
  51.                        INDIRECT     @n
  52.  
  53.  
  54.      COREWARS (Revision 2.22)                              Page 2 of 5
  55.      Copyright (c) Triskelian Simulations 1990.
  56.  
  57.      This is not the place to wax loquacious [Editor's note: that
  58.      means long winded and usually indicates that SOMEONE is using big
  59.      words just to impress you with their vocabulary...]  As we were
  60.      saying, this simply isn't the place to describe what assembly
  61.      language programming is all about.  People have written entire
  62.      books on the subject.  (Then again, people have written entire
  63.      books on the mating habits of frogs.)  The original Scientific
  64.      American articles contain a good overview and list some useful
  65.      references for further reading.
  66.  
  67.  
  68.      SAMPLE PROGRAMS
  69.      ===============
  70.  
  71.      Some sample REDCODE programs have been included.  All of the
  72.      sample programs are in files with an *.WAR extension.  Most of
  73.      these programs are taken directly from the magazine articles and
  74.      discussed there in some detail.  Two programs, A_IMP and AA_IMP,
  75.      were borrowed from R.Sawyer.  DDWARF and IMPACT were added just
  76.      to keep everything interesting.
  77.  
  78.  
  79.           Filename    Description
  80.           --------    -----------
  81.           CHANG1    A sample program using SPL (a proposed but
  82.                         non-implemented REDCODE instruction)
  83.  
  84.           DWARF        A simple attack program, step of 5
  85.           DWARF13    Same as DWARF, step of 13
  86.           DWARF29    Same as DWARF, but hits every 29th
  87.           DDWARF    DWARF modified to cope with PCT instruction
  88.  
  89.           GEMINI    A self-cloning program (offset 100)
  90.           BIGFOOT    A GEMINI clone using a prime number offset
  91.           JUGGER    A GEMINI clone that rolls through memory
  92.  
  93.           IMP        Core Wars' answer to the tortoise
  94.           IMPSTOMP    Defensive Anti-IMP program
  95.           IMPACT    IMPSTOMP using PCT instruction
  96.           A_IMP        Anti-IMP program
  97.           AA_IMP    Anti-Anti-IMP program
  98.  
  99.  
  100.      COREWARS (Revision 2.22)                              Page 3 of 5
  101.      Copyright (c) Triskelian Simulations 1990.
  102.  
  103.      REVISION HISTORY
  104.      ================
  105.  
  106.      Okay, like most programmers, it was impossible to resist the urge
  107.      to spruce COREWARS up a bit.  This version [2.xx] was created in
  108.      May 1990 and revised in a flurry of furious coding during one
  109.      week in July/August 1990.  Initially the changes were only
  110.      intended to make the thing play with more recent developments
  111.      (like Borland's Turbo-C, ANSI graphics, and MS-DOS) on an IBM-
  112.      PC/AT clone.  I refuse to get addicted to this thing and spend my
  113.      non-existent free time on tweaking it {this after three or four
  114.      revisions. Sheesh}.  There are probably newer and better versions
  115.      out there somewhere, but I haven't seen them.
  116.  
  117.      The following extras HAVE been added.  The version where each
  118.      upgrade was added is shown in square brackets.
  119.  
  120.  
  121.           Upgrade COREWARS to Turbo-C, ANSI, etc.              [2.00]
  122.           ---
  123.           Use the *.WAR extension (borrowed from R.Sawyer)     [2.10]
  124.           Semicolon comments in *.WAR files                    [2.10]
  125.           Selectable maximum memory size                       [2.10]
  126.           Selectable starting locations                        [2.10]
  127.           Options to suppress execution outputs                [2.10]
  128.           Flags to support memory displays, PCT, etc.          [2.10]
  129.           A_IMP.WAR & AA_IMP.WAR (borrowed from R.Sawyer)      [2.10]
  130.           ---
  131.           Selectable CPU slice (instructions per cycle)        [2.11]
  132.           Added numerous *.WAR files                           [2.11]
  133.           ---
  134.           Added PCT instruction                                [2.20]
  135.           Detect program subversion (IMP problem)              [2.20]
  136.           User interrupt of memory dump (hit [ESCAPE])         [2.20]
  137.           Add flags (MemA, MemB, PROTECT) to memory dump       [2.20]
  138.           Cosmetic changes to execution display                [2.20]
  139.           ---
  140.           Show user why *.WAR file input aborted and recover   [2.21]
  141.           Trap user null programs and recover                  [2.21]
  142.           ---
  143.           Selectable instruction addressing range              [2.22]
  144.  
  145.  
  146.      COREWARS (Revision 2.22)                              Page 4 of 5
  147.      Copyright (c) Triskelian Simulations 1990.
  148.  
  149.      FOR MORE INFORMATION
  150.      ====================
  151.  
  152.      Contact the following people for further information about
  153.      COREWARS.  Please note this information is over three years old
  154.      and therefore is rather suspect.
  155.  
  156.  
  157.                The Core Wars Newsletter
  158.                c/o William R. Buckley
  159.                5712 Kern Drive
  160.                Huntington Beach, CA   92649
  161.  
  162.                International Core Wars Society
  163.                c/o Mark Clarkson
  164.                8619 Wassall Street
  165.                Wichita, KS   67210-1934
  166.  
  167.                A.K.Dewdney
  168.                c/o The Editors
  169.                Scientific American
  170.                415 Madison Avenue
  171.                New York, NY  10017
  172.  
  173.  
  174.      COREWARS (Revision 2.22)                              Page 5 of 5
  175.      Copyright (c) Triskelian Simulations 1990.
  176.  
  177.      NONE OF THE ABOVE (obviously)
  178.      =============================
  179.  
  180.      COREWARS requires ANSI.SYS support to run normally.  If you start
  181.      seeing things like "[4;H" or "[35m" popping up on your screen --
  182.      DON'T PANIC.  Just add a line like "DEVICE=ANSI.SYS" to your
  183.      CONFIG.SYS file.  Pertinent details can be found in  your (or
  184.      anybody else's) DOS manual.
  185.  
  186.      This program is hereby released to the PUBLIC DOMAIN.  No copies
  187.      or derivatives of this product may be distributed for profit or
  188.      personal gain.  A minimal handling fee may be charged for
  189.      distribution.
  190.  
  191.      COREWARS and any associated files and documentation are
  192.      distributed without any express or implied warranties.
  193.      Triskelian Simulations does not warrant that COREWARS or any
  194.      associated files operate as claimed.  You the user assume full
  195.      risk for any direct or consequential damages, even if Triskelian
  196.      Simulations has been advised of the possibility of any damages.
  197.      By using this program you agree to abide by the terms and
  198.      conditions stated above.
  199.  
  200.      If all else fails, contact Triskelian Simulations on our local
  201.      support bulletin board:  TECHLINE BBS  (206)532-9220.  We are
  202.      probably more confused than you are, but we will try and help.
  203.  
  204.      COREWARS source code, in ANSI standard Turbo-C, is available for
  205.      $15.00 (cash, check, or money order) from Triskelian Simulations.
  206.  
  207.      One final parting shot, er, note.  I would like to thank Richard
  208.      Edwards for nagging me so much about COREWARS that I spiffied the
  209.      thing up just to make him go away.  Actually, it was a blast.
  210.  
  211.  
  212.      David E. Thomas
  213.      Triskelian Simulations
  214.      630 Washington
  215.      Hoquiam, WA  98550
  216.